home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1596 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: news.iag.net!news
  2. From: jatmon@iag.net (John R Buchan)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Question!@#!
  5. Date: 15 Jan 1996 16:04:33 GMT
  6. Organization: Internet Access Group, Orlando, Florida
  7. Message-ID: <4ddtuh$1a1@news.iag.net>
  8. References: <4dcejq$2un@venus.senecac.on.ca>
  9. NNTP-Posting-Host: pm1-orl26.iag.net
  10. X-Newsreader: WinVN 0.99.7
  11.  
  12. In article <4dcejq$2un@venus.senecac.on.ca>, cweselak@learn.senecac.on.ca 
  13. says...
  14. ->
  15. ->
  16. ->I have a very Simple question.. well, it should be simple for 'alot' of 
  17. ->you reading this newsgroup..
  18. ->
  19. ->anyways.
  20. ->
  21. ->I have created a program that asks THE users for his name, then writes it 
  22. ->to a file, the file is called name.txt..
  23. ->
  24. ->Evertime this program is executed, the file name.txt get's overwritten.
  25. ->
  26. ->How can i keep this file, name.txt, so that i can eventually have a 
  27. ->listing of all users who ran my program???
  28.  
  29. You don't state, which function you are using to open the file.  You should
  30. be using the ansi fopen, though some people insist on using others.... :-)
  31.  
  32. Just change the mode to append "a", instead of write "w".
  33.  
  34. -- 
  35. John R Buchan           -:|:-     Looking for that elusive FAQ?  ftp to:
  36. jatmon@mail.iag.net     -:|:-     rtfm.mit.edu /pub/usenet-by-group/....
  37.  
  38.